﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AutoLoL.Logic.Repositories;
using System.Collections.ObjectModel;
using AutoLoL.Entities;

namespace AutoLoL.Logic.Factories
{
    // Is this a factory pattern? No idea =)
    public class MasteryFactory : IMasteryRepository
    {
        private static MasteryFactory _instance;
        public static MasteryFactory Instance
        {
            get
            {
                if (_instance == null)
                {
                    _instance = new MasteryFactory();
                }

                return _instance;
            }
        }

        private IMasteryRepository _repository;

        private MasteryFactory()
        {
        }

        public void SetRepository(IMasteryRepository repository)
        {
            _repository = repository;
        }

        public MasteryBase GetMasteryById(int masteryId)
        {
            return _repository.GetMasteryById(masteryId);
        }

        public MasteryBuild GetMasteryBuild()
        {
            return _repository.GetMasteryBuild();
        }
    }
}
